   1              		.syntax unified
   2              		.cpu cortex-m3
   3              		.fpu softvfp
   4              		.eabi_attribute 20, 1
   5              		.eabi_attribute 21, 1
   6              		.eabi_attribute 23, 3
   7              		.eabi_attribute 24, 1
   8              		.eabi_attribute 25, 1
   9              		.eabi_attribute 26, 1
  10              		.eabi_attribute 30, 4
  11              		.eabi_attribute 34, 1
  12              		.eabi_attribute 18, 4
  13              		.thumb
  14              		.syntax unified
  15              		.file	"hx711.c"
  16              		.text
  17              	.Ltext0:
  18              		.cfi_sections	.debug_frame
  19              		.global	__aeabi_i2f
  20              		.global	__aeabi_fdiv
  21              		.global	__aeabi_f2iz
  22              		.section	.text.hx711_ReadData.part.0,"ax",%progbits
  23              		.align	1
  24              		.thumb
  25              		.thumb_func
  27              	hx711_ReadData.part.0:
  28              	.LFB14:
  29              		.file 1 "uc_libc_dev/sensor/hx711.c"
   1:uc_libc_dev/sensor/hx711.c **** // Biblioteca para ler sensores de peso
   2:uc_libc_dev/sensor/hx711.c **** // 		Escrita em 20/08/2015
   3:uc_libc_dev/sensor/hx711.c **** // 		Esta biblioteca trabalha com hx711 usando o modo padrão do circuito:
   4:uc_libc_dev/sensor/hx711.c **** //			Amostragem dos valores a 10SPS
   5:uc_libc_dev/sensor/hx711.c **** //			Usando canal A com ganho de 128
   6:uc_libc_dev/sensor/hx711.c **** 
   7:uc_libc_dev/sensor/hx711.c **** #include "hx711.h"
   8:uc_libc_dev/sensor/hx711.c **** #include "hx711_drv.h"
   9:uc_libc_dev/sensor/hx711.c **** #include "delay.h"
  10:uc_libc_dev/sensor/hx711.c **** 
  11:uc_libc_dev/sensor/hx711.c **** #if (HX711_USE_PROCESS == pdON)
  12:uc_libc_dev/sensor/hx711.c **** #include "systime_irq.h"
  13:uc_libc_dev/sensor/hx711.c **** #endif
  14:uc_libc_dev/sensor/hx711.c **** 
  15:uc_libc_dev/sensor/hx711.c **** #include <stdlib.h>
  16:uc_libc_dev/sensor/hx711.c **** void hx711_ClearBuf(void);
  17:uc_libc_dev/sensor/hx711.c **** 
  18:uc_libc_dev/sensor/hx711.c **** typedef struct {
  19:uc_libc_dev/sensor/hx711.c **** 	s32 offset;			// Valor para desconsiderar qualquer objeto que fica sobre o sensor para dar apoio a
  20:uc_libc_dev/sensor/hx711.c **** 	float scale;		// Ajusta a escala de medida para seu respectivo tipo de sensor
  21:uc_libc_dev/sensor/hx711.c **** 	s32 data;			// Valor em gramas
  22:uc_libc_dev/sensor/hx711.c **** } tHx711, *pHx711;
  23:uc_libc_dev/sensor/hx711.c **** static tHx711 hx711;
  24:uc_libc_dev/sensor/hx711.c **** 
  25:uc_libc_dev/sensor/hx711.c **** static uint timeoutLoad;
  26:uc_libc_dev/sensor/hx711.c **** static volatile uint timeout; // Contador do timeout
  27:uc_libc_dev/sensor/hx711.c **** 
  28:uc_libc_dev/sensor/hx711.c **** static int hx711_ReadData(int calib);
  29:uc_libc_dev/sensor/hx711.c **** static int hx711_Average(int calib);
  30:uc_libc_dev/sensor/hx711.c **** 
  31:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
  32:uc_libc_dev/sensor/hx711.c **** // Inicia o hx711 usando canal A com ganho de 128
  33:uc_libc_dev/sensor/hx711.c **** // 	Paramentro:
  34:uc_libc_dev/sensor/hx711.c **** //		tm: tempo em ms na espera da resposta do hx711
  35:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
  36:uc_libc_dev/sensor/hx711.c **** void hx711_Init(uint tm) {
  37:uc_libc_dev/sensor/hx711.c **** 	hx711_SetupPorts();
  38:uc_libc_dev/sensor/hx711.c **** 	timeoutLoad = tm;
  39:uc_libc_dev/sensor/hx711.c **** 
  40:uc_libc_dev/sensor/hx711.c **** 	hx711.offset = 0;
  41:uc_libc_dev/sensor/hx711.c **** 	hx711.scale = 1;
  42:uc_libc_dev/sensor/hx711.c **** 
  43:uc_libc_dev/sensor/hx711.c **** 	hx711_Reset();
  44:uc_libc_dev/sensor/hx711.c **** }
  45:uc_libc_dev/sensor/hx711.c **** 
  46:uc_libc_dev/sensor/hx711.c **** // emitir um reset ao hx711 para colocar nas condições padrões
  47:uc_libc_dev/sensor/hx711.c **** void hx711_Reset(void) {
  48:uc_libc_dev/sensor/hx711.c **** 	hx711_ClockHigh();
  49:uc_libc_dev/sensor/hx711.c **** 	delay_us(100); // Espera para que o hx711 perceba o sinal de reset
  50:uc_libc_dev/sensor/hx711.c **** 	hx711_ClockLow();
  51:uc_libc_dev/sensor/hx711.c **** 
  52:uc_libc_dev/sensor/hx711.c **** 	hx711.data = 0;
  53:uc_libc_dev/sensor/hx711.c **** 	hx711_ClearBuf();
  54:uc_libc_dev/sensor/hx711.c **** }
  55:uc_libc_dev/sensor/hx711.c **** 
  56:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
  57:uc_libc_dev/sensor/hx711.c **** // Configura o modo de trabalho do hx711.   AINDA NÃO TESTATO
  58:uc_libc_dev/sensor/hx711.c **** // 	De acordo com a quantidade de pulsos enviados ao hx711 configuramos o mesmo
  59:uc_libc_dev/sensor/hx711.c **** //		25 pulsos seleciona o canal A para medição com ganho de 128
  60:uc_libc_dev/sensor/hx711.c **** //		27 pulsos seleciona o canal A para medição com ganho de 64
  61:uc_libc_dev/sensor/hx711.c **** //		26 pulsos seleciona o canal B para medição com ganho de 32
  62:uc_libc_dev/sensor/hx711.c **** // 	Paramentros:
  63:uc_libc_dev/sensor/hx711.c **** //		nPulse: HX711_SET_CHANNEL_A_128, HX711_SET_CHANNEL_A_64, HX711_SET_CHANNEL_B_32
  64:uc_libc_dev/sensor/hx711.c **** // 	Retorna:
  65:uc_libc_dev/sensor/hx711.c **** //		pdPASS se a configuração foi feita com sucesso
  66:uc_libc_dev/sensor/hx711.c **** //		pdFAIL se não foi possivel configurar o hx711
  67:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
  68:uc_libc_dev/sensor/hx711.c **** int hx711_Config(int nPulse) {
  69:uc_libc_dev/sensor/hx711.c **** 	timeout = timeoutLoad;
  70:uc_libc_dev/sensor/hx711.c **** 
  71:uc_libc_dev/sensor/hx711.c **** 	while (hx711_DOUT()) {
  72:uc_libc_dev/sensor/hx711.c **** 		if (timeout == 0) return pdFAIL;
  73:uc_libc_dev/sensor/hx711.c **** 	}
  74:uc_libc_dev/sensor/hx711.c **** 
  75:uc_libc_dev/sensor/hx711.c **** 	int x; for (x=0; x<nPulse; x++) {
  76:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockHigh();
  77:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
  78:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockLow();
  79:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
  80:uc_libc_dev/sensor/hx711.c **** 	}
  81:uc_libc_dev/sensor/hx711.c **** 
  82:uc_libc_dev/sensor/hx711.c **** 	return pdPASS;
  83:uc_libc_dev/sensor/hx711.c **** }
  84:uc_libc_dev/sensor/hx711.c **** 
  85:uc_libc_dev/sensor/hx711.c **** static uint idxBuf;
  86:uc_libc_dev/sensor/hx711.c **** static s32 buf[HX711_nSAMPLY];
  87:uc_libc_dev/sensor/hx711.c **** void hx711_ClearBuf(void) {
  88:uc_libc_dev/sensor/hx711.c **** 	int x; for (x=0;x<HX711_nSAMPLY;x++) buf[x]=0;
  89:uc_libc_dev/sensor/hx711.c **** 	idxBuf = 0;
  90:uc_libc_dev/sensor/hx711.c **** }
  91:uc_libc_dev/sensor/hx711.c **** 
  92:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
  93:uc_libc_dev/sensor/hx711.c **** // Lê os valores no hx711
  94:uc_libc_dev/sensor/hx711.c **** // 	Paramentro:
  95:uc_libc_dev/sensor/hx711.c **** //		calib: pdTRUE sinaliza que a leitura é para calibração, ou seja, vamos desconsiderar o offset
  96:uc_libc_dev/sensor/hx711.c **** // 	Retorna:
  97:uc_libc_dev/sensor/hx711.c **** //		pdPASS se a leitura foi feito com sucesso
  98:uc_libc_dev/sensor/hx711.c **** //		pdFAIL se não foi possivel ler os dados
  99:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 100:uc_libc_dev/sensor/hx711.c **** static int hx711_ReadData(int calib) {
  30              		.loc 1 100 0
  31              		.cfi_startproc
  32              		@ args = 0, pretend = 0, frame = 0
  33              		@ frame_needed = 0, uses_anonymous_args = 0
  34              	.LVL0:
  35 0000 2DE9F84F 		push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
  36              	.LCFI0:
  37              		.cfi_def_cfa_offset 40
  38              		.cfi_offset 3, -40
  39              		.cfi_offset 4, -36
  40              		.cfi_offset 5, -32
  41              		.cfi_offset 6, -28
  42              		.cfi_offset 7, -24
  43              		.cfi_offset 8, -20
  44              		.cfi_offset 9, -16
  45              		.cfi_offset 10, -12
  46              		.cfi_offset 11, -8
  47              		.cfi_offset 14, -4
  48              		.loc 1 100 0
  49 0004 0646     		mov	r6, r0
 101:uc_libc_dev/sensor/hx711.c **** 	 // Se o hx711 colocar esse pino em baixa, sinaliza que há dados a ser lidos
 102:uc_libc_dev/sensor/hx711.c **** 	if (hx711_DOUT()) return pdFAIL;
 103:uc_libc_dev/sensor/hx711.c **** 
 104:uc_libc_dev/sensor/hx711.c **** 	// Emitir 24 pulsos de clock e ler os bits de dados. O primeiro bit é MSB
 105:uc_libc_dev/sensor/hx711.c **** 	hx711.data = 0;
  50              		.loc 1 105 0
  51 0006 454C     		ldr	r4, .L29
  52 0008 0023     		movs	r3, #0
 106:uc_libc_dev/sensor/hx711.c **** 	int x; for (x=0; x<24; x++) {
 107:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockHigh();
  53              		.loc 1 107 0
  54 000a 454F     		ldr	r7, .L29+4
 108:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
 109:uc_libc_dev/sensor/hx711.c **** 		if (hx711_DOUT()) hx711.data |= _BV(23-x);
  55              		.loc 1 109 0
  56 000c DFF81C91 		ldr	r9, .L29+16
 105:uc_libc_dev/sensor/hx711.c **** 	int x; for (x=0; x<24; x++) {
  57              		.loc 1 105 0
  58 0010 A360     		str	r3, [r4, #8]
  59              	.LVL1:
  60 0012 4FF01708 		mov	r8, #23
 107:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
  61              		.loc 1 107 0
  62 0016 4FF40065 		mov	r5, #2048
  63              	.LVL2:
  64              	.L3:
  65 001a 4FF40063 		mov	r3, #2048
  66 001e 3B60     		str	r3, [r7]
 108:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
  67              		.loc 1 108 0
  68 0020 2120     		movs	r0, #33
  69 0022 FFF7FEFF 		bl	delay
  70              	.LVL3:
  71              		.loc 1 109 0
  72 0026 D9F80030 		ldr	r3, [r9]
  73 002a 5905     		lsls	r1, r3, #21
  74 002c 05D5     		bpl	.L2
  75 002e A168     		ldr	r1, [r4, #8]
  76 0030 0123     		movs	r3, #1
  77 0032 03FA08F3 		lsl	r3, r3, r8
  78 0036 0B43     		orrs	r3, r3, r1
  79 0038 A360     		str	r3, [r4, #8]
  80              	.L2:
 110:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockLow();
  81              		.loc 1 110 0
  82 003a DFF8F4A0 		ldr	r10, .L29+20
 111:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
  83              		.loc 1 111 0
  84 003e 2120     		movs	r0, #33
 110:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockLow();
  85              		.loc 1 110 0
  86 0040 CAF80050 		str	r5, [r10]
  87              		.loc 1 111 0
  88 0044 FFF7FEFF 		bl	delay
  89              	.LVL4:
 106:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockHigh();
  90              		.loc 1 106 0
  91 0048 18F1FF38 		adds	r8, r8, #-1
  92              	.LVL5:
 110:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockLow();
  93              		.loc 1 110 0
  94 004c 4FF4006B 		mov	fp, #2048
 106:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockHigh();
  95              		.loc 1 106 0
  96 0050 E3D2     		bcs	.L3
 112:uc_libc_dev/sensor/hx711.c **** 	}
 113:uc_libc_dev/sensor/hx711.c **** 
 114:uc_libc_dev/sensor/hx711.c **** 	// Emitir 25° clock para colocar o hx711 pronto para a próxima atualização
 115:uc_libc_dev/sensor/hx711.c **** 	hx711_ClockHigh();
  97              		.loc 1 115 0
  98 0052 334B     		ldr	r3, .L29+4
 116:uc_libc_dev/sensor/hx711.c **** 	delay_us(1);
  99              		.loc 1 116 0
 100 0054 2120     		movs	r0, #33
 115:uc_libc_dev/sensor/hx711.c **** 	delay_us(1);
 101              		.loc 1 115 0
 102 0056 C3F800B0 		str	fp, [r3]
 103              		.loc 1 116 0
 104 005a FFF7FEFF 		bl	delay
 105              	.LVL6:
 117:uc_libc_dev/sensor/hx711.c **** 	hx711_ClockLow();
 118:uc_libc_dev/sensor/hx711.c **** 	delay_us(1);
 106              		.loc 1 118 0
 107 005e 2120     		movs	r0, #33
 117:uc_libc_dev/sensor/hx711.c **** 	hx711_ClockLow();
 108              		.loc 1 117 0
 109 0060 CAF800B0 		str	fp, [r10]
 110              		.loc 1 118 0
 111 0064 FFF7FEFF 		bl	delay
 112              	.LVL7:
 119:uc_libc_dev/sensor/hx711.c **** 
 120:uc_libc_dev/sensor/hx711.c **** 	// se o bit 23 estiver ligado se trata de um número negativo, então vamos cololocar os demais bit 
 121:uc_libc_dev/sensor/hx711.c **** 	if ((hx711.data & BIT_23) > 0) hx711.data |= 0xFF000000;
 113              		.loc 1 121 0
 114 0068 A368     		ldr	r3, [r4, #8]
 122:uc_libc_dev/sensor/hx711.c **** 
 123:uc_libc_dev/sensor/hx711.c **** 	// fazer filtro
 124:uc_libc_dev/sensor/hx711.c **** 	buf[idxBuf % HX711_nSAMPLY] = hx711.data;
 115              		.loc 1 124 0
 116 006a 2E4D     		ldr	r5, .L29+8
 121:uc_libc_dev/sensor/hx711.c **** 
 117              		.loc 1 121 0
 118 006c 1A02     		lsls	r2, r3, #8
 119 006e 44BF     		itt	mi
 120 0070 2A4A     		ldrmi	r2, .L29
 121 0072 43F07F43 		orrmi	r3, r3, #-16777216
 122              		.loc 1 124 0
 123 0076 2968     		ldr	r1, [r5]
 121:uc_libc_dev/sensor/hx711.c **** 
 124              		.loc 1 121 0
 125 0078 48BF     		it	mi
 126 007a 9360     		strmi	r3, [r2, #8]
 127              		.loc 1 124 0
 128 007c 1423     		movs	r3, #20
 129 007e B1FBF3F0 		udiv	r0, r1, r3
 130 0082 03FB1010 		mls	r0, r3, r0, r1
 131 0086 284A     		ldr	r2, .L29+12
 132 0088 A768     		ldr	r7, [r4, #8]
 133 008a AE46     		mov	lr, r5
 134 008c 42F82070 		str	r7, [r2, r0, lsl #2]
 125:uc_libc_dev/sensor/hx711.c **** 	if (idxBuf > 0) {
 135              		.loc 1 125 0
 136 0090 79B3     		cbz	r1, .L5
 137              	.LBB3:
 126:uc_libc_dev/sensor/hx711.c **** 		int qtd;
 127:uc_libc_dev/sensor/hx711.c **** 		if (idxBuf < HX711_nSAMPLY) qtd = idxBuf+1; else qtd = HX711_nSAMPLY;
 128:uc_libc_dev/sensor/hx711.c **** 
 129:uc_libc_dev/sensor/hx711.c **** 		// media normal
 130:uc_libc_dev/sensor/hx711.c **** 		s32 m = 0;
 138              		.loc 1 130 0
 139 0092 0025     		movs	r5, #0
 131:uc_libc_dev/sensor/hx711.c **** 		int i; for (i=0;i<qtd;i++) m += buf[i];
 140              		.loc 1 131 0
 141 0094 AC46     		mov	ip, r5
 127:uc_libc_dev/sensor/hx711.c **** 
 142              		.loc 1 127 0
 143 0096 1329     		cmp	r1, #19
 144 0098 98BF     		it	ls
 145 009a 4B1C     		addls	r3, r1, #1
 146              	.LVL8:
 147              	.L7:
 148              		.loc 1 131 0
 149 009c 52F82C70 		ldr	r7, [r2, ip, lsl #2]
 150 00a0 0CF1010C 		add	ip, ip, #1
 151              	.LVL9:
 152 00a4 9C45     		cmp	ip, r3
 153 00a6 3D44     		add	r5, r5, r7
 154              	.LVL10:
 155 00a8 F8D1     		bne	.L7
 132:uc_libc_dev/sensor/hx711.c **** 		m = m/qtd;
 133:uc_libc_dev/sensor/hx711.c **** 
 134:uc_libc_dev/sensor/hx711.c **** 		// vamos remover o ponto discrepante
 135:uc_libc_dev/sensor/hx711.c **** 		s32 xx;
 136:uc_libc_dev/sensor/hx711.c **** 		s32 k, d;
 137:uc_libc_dev/sensor/hx711.c **** 		k = idxBuf % HX711_nSAMPLY; //automaticamente considera o último ponto como sendo ruim
 138:uc_libc_dev/sensor/hx711.c **** 		d = 0; //nao tao ruim assim, por consideramos aqui com desvio "0" da media
 156              		.loc 1 138 0
 157 00aa 4FF00008 		mov	r8, #0
 158              	.LVL11:
 132:uc_libc_dev/sensor/hx711.c **** 		m = m/qtd;
 159              		.loc 1 132 0
 160 00ae 95FBF3F5 		sdiv	r5, r5, r3
 161              	.LVL12:
 139:uc_libc_dev/sensor/hx711.c **** 
 140:uc_libc_dev/sensor/hx711.c **** 		// procuramos pelo ponto mais longe
 141:uc_libc_dev/sensor/hx711.c **** 		for (i=0;i<qtd;i++) {
 162              		.loc 1 141 0
 163 00b2 C446     		mov	ip, r8
 164              	.LVL13:
 165              	.L9:
 142:uc_libc_dev/sensor/hx711.c **** 			xx = abs(m - buf[i]); 	// qual a diferença deste ponto para media?
 166              		.loc 1 142 0
 167 00b4 52F82C70 		ldr	r7, [r2, ip, lsl #2]
 168 00b8 EF1B     		subs	r7, r5, r7
 169 00ba 002F     		cmp	r7, #0
 170 00bc B8BF     		it	lt
 171 00be 7F42     		rsblt	r7, r7, #0
 172              	.LVL14:
 143:uc_libc_dev/sensor/hx711.c **** 			if (xx<d) continue;    		// é menor que o outro? entao esquece e vai para o proximo
 173              		.loc 1 143 0
 174 00c0 4745     		cmp	r7, r8
 175 00c2 A8BF     		it	ge
 176 00c4 6046     		movge	r0, ip
 141:uc_libc_dev/sensor/hx711.c **** 			xx = abs(m - buf[i]); 	// qual a diferença deste ponto para media?
 177              		.loc 1 141 0
 178 00c6 0CF1010C 		add	ip, ip, #1
 179              	.LVL15:
 180              		.loc 1 143 0
 181 00ca A8BF     		it	ge
 182 00cc B846     		movge	r8, r7
 183              	.LVL16:
 141:uc_libc_dev/sensor/hx711.c **** 			xx = abs(m - buf[i]); 	// qual a diferença deste ponto para media?
 184              		.loc 1 141 0
 185 00ce 6345     		cmp	r3, ip
 186 00d0 F0D1     		bne	.L9
 187 00d2 0025     		movs	r5, #0
 188              	.LVL17:
 189 00d4 AC46     		mov	ip, r5
 190              	.LVL18:
 191              	.L11:
 144:uc_libc_dev/sensor/hx711.c **** 			k = i;						// marca o ponto "i" como sendo o pior de todos ate agora
 145:uc_libc_dev/sensor/hx711.c **** 			d = xx;						// anota quao ruim ele é
 146:uc_libc_dev/sensor/hx711.c **** 		}
 147:uc_libc_dev/sensor/hx711.c **** 
 148:uc_libc_dev/sensor/hx711.c **** 		// vamor calcular novamente a media sem o ponto ruim
 149:uc_libc_dev/sensor/hx711.c **** 		m = 0;
 150:uc_libc_dev/sensor/hx711.c **** 		for (i=0;i<qtd;i++) if (i!=k) m += buf[i];
 192              		.loc 1 150 0
 193 00d6 6045     		cmp	r0, ip
 194 00d8 18BF     		it	ne
 195 00da 52F82C70 		ldrne	r7, [r2, ip, lsl #2]
 196 00de 0CF1010C 		add	ip, ip, #1
 197              	.LVL19:
 198 00e2 18BF     		it	ne
 199 00e4 ED19     		addne	r5, r5, r7
 200              	.LVL20:
 201 00e6 6345     		cmp	r3, ip
 202 00e8 F5D1     		bne	.L11
 203              	.LVL21:
 151:uc_libc_dev/sensor/hx711.c **** 		m = m/(qtd-1); // -1 porque sabemos que foi retirado apenas 1 ponto
 152:uc_libc_dev/sensor/hx711.c **** 
 153:uc_libc_dev/sensor/hx711.c **** 		hx711.data =(s32)m;
 204              		.loc 1 153 0
 205 00ea 5A1E     		subs	r2, r3, #1
 206 00ec 95FBF2F3 		sdiv	r3, r5, r2
 207              	.LVL22:
 208 00f0 A360     		str	r3, [r4, #8]
 209              	.LVL23:
 210              	.L5:
 211              	.LBE3:
 154:uc_libc_dev/sensor/hx711.c **** 	}
 155:uc_libc_dev/sensor/hx711.c **** 
 156:uc_libc_dev/sensor/hx711.c **** 	idxBuf++;
 212              		.loc 1 156 0
 213 00f2 4B1C     		adds	r3, r1, #1
 214 00f4 CEF80030 		str	r3, [lr]
 157:uc_libc_dev/sensor/hx711.c **** 
 158:uc_libc_dev/sensor/hx711.c **** 	hx711.data /= hx711.scale;
 215              		.loc 1 158 0
 216 00f8 A068     		ldr	r0, [r4, #8]
 217 00fa FFF7FEFF 		bl	__aeabi_i2f
 218              	.LVL24:
 219 00fe 6168     		ldr	r1, [r4, #4]	@ float
 220 0100 FFF7FEFF 		bl	__aeabi_fdiv
 221              	.LVL25:
 222 0104 FFF7FEFF 		bl	__aeabi_f2iz
 223              	.LVL26:
 224 0108 044D     		ldr	r5, .L29
 225 010a A060     		str	r0, [r4, #8]
 159:uc_libc_dev/sensor/hx711.c **** 	// se não for calibração
 160:uc_libc_dev/sensor/hx711.c **** 	if (!calib) hx711.data -= hx711.offset;
 226              		.loc 1 160 0
 227 010c 16B9     		cbnz	r6, .L12
 228 010e 2B68     		ldr	r3, [r5]
 229 0110 C01A     		subs	r0, r0, r3
 230 0112 A860     		str	r0, [r5, #8]
 231              	.L12:
 161:uc_libc_dev/sensor/hx711.c **** 
 162:uc_libc_dev/sensor/hx711.c **** 	return pdPASS;
 163:uc_libc_dev/sensor/hx711.c **** }
 232              		.loc 1 163 0
 233 0114 0120     		movs	r0, #1
 234 0116 BDE8F88F 		pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
 235              	.LVL27:
 236              	.L30:
 237 011a 00BF     		.align	2
 238              	.L29:
 239 011c 00000000 		.word	.LANCHOR0
 240 0120 18C00920 		.word	537509912
 241 0124 00000000 		.word	.LANCHOR1
 242 0128 00000000 		.word	.LANCHOR2
 243 012c 14C00920 		.word	537509908
 244 0130 1CC00920 		.word	537509916
 245              		.cfi_endproc
 246              	.LFE14:
 248              		.section	.text.hx711_Config,"ax",%progbits
 249              		.align	1
 250              		.global	hx711_Config
 251              		.thumb
 252              		.thumb_func
 254              	hx711_Config:
 255              	.LFB2:
  68:uc_libc_dev/sensor/hx711.c **** 	timeout = timeoutLoad;
 256              		.loc 1 68 0
 257              		.cfi_startproc
 258              		@ args = 0, pretend = 0, frame = 0
 259              		@ frame_needed = 0, uses_anonymous_args = 0
 260              	.LVL28:
 261 0000 2DE9F041 		push	{r4, r5, r6, r7, r8, lr}
 262              	.LCFI1:
 263              		.cfi_def_cfa_offset 24
 264              		.cfi_offset 4, -24
 265              		.cfi_offset 5, -20
 266              		.cfi_offset 6, -16
 267              		.cfi_offset 7, -12
 268              		.cfi_offset 8, -8
 269              		.cfi_offset 14, -4
  68:uc_libc_dev/sensor/hx711.c **** 	timeout = timeoutLoad;
 270              		.loc 1 68 0
 271 0004 0646     		mov	r6, r0
  69:uc_libc_dev/sensor/hx711.c **** 
 272              		.loc 1 69 0
 273 0006 114B     		ldr	r3, .L40
 274 0008 1A68     		ldr	r2, [r3]
 275 000a 114B     		ldr	r3, .L40+4
 276 000c 1A60     		str	r2, [r3]
  71:uc_libc_dev/sensor/hx711.c **** 		if (timeout == 0) return pdFAIL;
 277              		.loc 1 71 0
 278 000e 114A     		ldr	r2, .L40+8
 279              	.LVL29:
 280              	.L32:
 281 0010 1468     		ldr	r4, [r2]
 282 0012 14F48064 		ands	r4, r4, #1024
 283 0016 03D0     		beq	.L38
  72:uc_libc_dev/sensor/hx711.c **** 	}
 284              		.loc 1 72 0
 285 0018 1868     		ldr	r0, [r3]
 286 001a 0028     		cmp	r0, #0
 287 001c F8D1     		bne	.L32
 288 001e 12E0     		b	.L33
 289              	.L38:
  76:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
 290              		.loc 1 76 0 discriminator 1
 291 0020 0D4F     		ldr	r7, .L40+12
  78:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
 292              		.loc 1 78 0 discriminator 1
 293 0022 DFF83880 		ldr	r8, .L40+16
  76:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
 294              		.loc 1 76 0 discriminator 1
 295 0026 4FF40065 		mov	r5, #2048
 296              	.L35:
 297              	.LVL30:
  75:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockHigh();
 298              		.loc 1 75 0 discriminator 1
 299 002a B442     		cmp	r4, r6
 300 002c 0ADA     		bge	.L39
  77:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockLow();
 301              		.loc 1 77 0 discriminator 3
 302 002e 2120     		movs	r0, #33
  76:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
 303              		.loc 1 76 0 discriminator 3
 304 0030 3D60     		str	r5, [r7]
  77:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockLow();
 305              		.loc 1 77 0 discriminator 3
 306 0032 FFF7FEFF 		bl	delay
 307              	.LVL31:
  78:uc_libc_dev/sensor/hx711.c **** 		delay_us(1);
 308              		.loc 1 78 0 discriminator 3
 309 0036 C8F80050 		str	r5, [r8]
  79:uc_libc_dev/sensor/hx711.c **** 	}
 310              		.loc 1 79 0 discriminator 3
 311 003a 2120     		movs	r0, #33
 312 003c FFF7FEFF 		bl	delay
 313              	.LVL32:
  75:uc_libc_dev/sensor/hx711.c **** 		hx711_ClockHigh();
 314              		.loc 1 75 0 discriminator 3
 315 0040 0134     		adds	r4, r4, #1
 316              	.LVL33:
 317 0042 F2E7     		b	.L35
 318              	.L39:
  82:uc_libc_dev/sensor/hx711.c **** }
 319              		.loc 1 82 0
 320 0044 0120     		movs	r0, #1
 321              	.LVL34:
 322              	.L33:
  83:uc_libc_dev/sensor/hx711.c **** 
 323              		.loc 1 83 0
 324 0046 BDE8F081 		pop	{r4, r5, r6, r7, r8, pc}
 325              	.LVL35:
 326              	.L41:
 327 004a 00BF     		.align	2
 328              	.L40:
 329 004c 00000000 		.word	.LANCHOR3
 330 0050 00000000 		.word	.LANCHOR4
 331 0054 14C00920 		.word	537509908
 332 0058 18C00920 		.word	537509912
 333 005c 1CC00920 		.word	537509916
 334              		.cfi_endproc
 335              	.LFE2:
 337              		.section	.text.hx711_ClearBuf,"ax",%progbits
 338              		.align	1
 339              		.global	hx711_ClearBuf
 340              		.thumb
 341              		.thumb_func
 343              	hx711_ClearBuf:
 344              	.LFB3:
  87:uc_libc_dev/sensor/hx711.c **** 	int x; for (x=0;x<HX711_nSAMPLY;x++) buf[x]=0;
 345              		.loc 1 87 0
 346              		.cfi_startproc
 347              		@ args = 0, pretend = 0, frame = 0
 348              		@ frame_needed = 0, uses_anonymous_args = 0
 349              		@ link register save eliminated.
 350              	.LVL36:
  88:uc_libc_dev/sensor/hx711.c **** 	idxBuf = 0;
 351              		.loc 1 88 0
 352 0000 0023     		movs	r3, #0
 353 0002 1946     		mov	r1, r3
 354 0004 044A     		ldr	r2, .L45
 355              	.LVL37:
 356              	.L43:
  88:uc_libc_dev/sensor/hx711.c **** 	idxBuf = 0;
 357              		.loc 1 88 0 is_stmt 0 discriminator 3
 358 0006 42F82310 		str	r1, [r2, r3, lsl #2]
 359 000a 0133     		adds	r3, r3, #1
 360              	.LVL38:
 361 000c 142B     		cmp	r3, #20
 362 000e FAD1     		bne	.L43
  89:uc_libc_dev/sensor/hx711.c **** }
 363              		.loc 1 89 0 is_stmt 1
 364 0010 024B     		ldr	r3, .L45+4
 365              	.LVL39:
 366 0012 0022     		movs	r2, #0
 367 0014 1A60     		str	r2, [r3]
 368 0016 7047     		bx	lr
 369              	.L46:
 370              		.align	2
 371              	.L45:
 372 0018 00000000 		.word	.LANCHOR2
 373 001c 00000000 		.word	.LANCHOR1
 374              		.cfi_endproc
 375              	.LFE3:
 377              		.section	.text.hx711_Reset,"ax",%progbits
 378              		.align	1
 379              		.global	hx711_Reset
 380              		.thumb
 381              		.thumb_func
 383              	hx711_Reset:
 384              	.LFB1:
  47:uc_libc_dev/sensor/hx711.c **** 	hx711_ClockHigh();
 385              		.loc 1 47 0
 386              		.cfi_startproc
 387              		@ args = 0, pretend = 0, frame = 0
 388              		@ frame_needed = 0, uses_anonymous_args = 0
  48:uc_libc_dev/sensor/hx711.c **** 	delay_us(100); // Espera para que o hx711 perceba o sinal de reset
 389              		.loc 1 48 0
 390 0000 084B     		ldr	r3, .L48
  47:uc_libc_dev/sensor/hx711.c **** 	hx711_ClockHigh();
 391              		.loc 1 47 0
 392 0002 10B5     		push	{r4, lr}
 393              	.LCFI2:
 394              		.cfi_def_cfa_offset 8
 395              		.cfi_offset 4, -8
 396              		.cfi_offset 14, -4
  48:uc_libc_dev/sensor/hx711.c **** 	delay_us(100); // Espera para que o hx711 perceba o sinal de reset
 397              		.loc 1 48 0
 398 0004 4FF40064 		mov	r4, #2048
 399 0008 1C60     		str	r4, [r3]
  49:uc_libc_dev/sensor/hx711.c **** 	hx711_ClockLow();
 400              		.loc 1 49 0
 401 000a 40F60550 		movw	r0, #3333
 402 000e FFF7FEFF 		bl	delay
 403              	.LVL40:
  50:uc_libc_dev/sensor/hx711.c **** 
 404              		.loc 1 50 0
 405 0012 054B     		ldr	r3, .L48+4
  52:uc_libc_dev/sensor/hx711.c **** 	hx711_ClearBuf();
 406              		.loc 1 52 0
 407 0014 0022     		movs	r2, #0
  50:uc_libc_dev/sensor/hx711.c **** 
 408              		.loc 1 50 0
 409 0016 1C60     		str	r4, [r3]
  52:uc_libc_dev/sensor/hx711.c **** 	hx711_ClearBuf();
 410              		.loc 1 52 0
 411 0018 044B     		ldr	r3, .L48+8
  54:uc_libc_dev/sensor/hx711.c **** 
 412              		.loc 1 54 0
 413 001a BDE81040 		pop	{r4, lr}
 414              	.LCFI3:
 415              		.cfi_restore 14
 416              		.cfi_restore 4
 417              		.cfi_def_cfa_offset 0
  52:uc_libc_dev/sensor/hx711.c **** 	hx711_ClearBuf();
 418              		.loc 1 52 0
 419 001e 9A60     		str	r2, [r3, #8]
  53:uc_libc_dev/sensor/hx711.c **** }
 420              		.loc 1 53 0
 421 0020 FFF7FEBF 		b	hx711_ClearBuf
 422              	.LVL41:
 423              	.L49:
 424              		.align	2
 425              	.L48:
 426 0024 18C00920 		.word	537509912
 427 0028 1CC00920 		.word	537509916
 428 002c 00000000 		.word	.LANCHOR0
 429              		.cfi_endproc
 430              	.LFE1:
 432              		.section	.text.hx711_Init,"ax",%progbits
 433              		.align	1
 434              		.global	hx711_Init
 435              		.thumb
 436              		.thumb_func
 438              	hx711_Init:
 439              	.LFB0:
  36:uc_libc_dev/sensor/hx711.c **** 	hx711_SetupPorts();
 440              		.loc 1 36 0
 441              		.cfi_startproc
 442              		@ args = 0, pretend = 0, frame = 0
 443              		@ frame_needed = 0, uses_anonymous_args = 0
 444              		@ link register save eliminated.
 445              	.LVL42:
  37:uc_libc_dev/sensor/hx711.c **** 	timeoutLoad = tm;
 446              		.loc 1 37 0
 447 0000 094A     		ldr	r2, .L51
 448 0002 1368     		ldr	r3, [r2]
 449 0004 43F40063 		orr	r3, r3, #2048
 450 0008 1360     		str	r3, [r2]
 451 000a 084B     		ldr	r3, .L51+4
 452 000c 4FF40062 		mov	r2, #2048
 453 0010 1A60     		str	r2, [r3]
  38:uc_libc_dev/sensor/hx711.c **** 
 454              		.loc 1 38 0
 455 0012 074B     		ldr	r3, .L51+8
  40:uc_libc_dev/sensor/hx711.c **** 	hx711.scale = 1;
 456              		.loc 1 40 0
 457 0014 0022     		movs	r2, #0
  38:uc_libc_dev/sensor/hx711.c **** 
 458              		.loc 1 38 0
 459 0016 1860     		str	r0, [r3]
  40:uc_libc_dev/sensor/hx711.c **** 	hx711.scale = 1;
 460              		.loc 1 40 0
 461 0018 064B     		ldr	r3, .L51+12
 462 001a 1A60     		str	r2, [r3]
  41:uc_libc_dev/sensor/hx711.c **** 
 463              		.loc 1 41 0
 464 001c 4FF07E52 		mov	r2, #1065353216
 465 0020 5A60     		str	r2, [r3, #4]	@ float
  43:uc_libc_dev/sensor/hx711.c **** }
 466              		.loc 1 43 0
 467 0022 FFF7FEBF 		b	hx711_Reset
 468              	.LVL43:
 469              	.L52:
 470 0026 00BF     		.align	2
 471              	.L51:
 472 0028 00C00920 		.word	537509888
 473 002c 1CC00920 		.word	537509916
 474 0030 00000000 		.word	.LANCHOR3
 475 0034 00000000 		.word	.LANCHOR0
 476              		.cfi_endproc
 477              	.LFE0:
 479              		.section	.text.hx711_ZeroAdjustment,"ax",%progbits
 480              		.align	1
 481              		.global	hx711_ZeroAdjustment
 482              		.thumb
 483              		.thumb_func
 485              	hx711_ZeroAdjustment:
 486              	.LFB6:
 164:uc_libc_dev/sensor/hx711.c **** 
 165:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 166:uc_libc_dev/sensor/hx711.c **** // Fazer a média de leituras. Função útil para ajuste de zero ou quando não estamos usando o filtro
 167:uc_libc_dev/sensor/hx711.c **** // 	Paramentro:
 168:uc_libc_dev/sensor/hx711.c **** //		calib: pdTRUE sinaliza que a leitura é para calibração, ou seja, vamos desconsiderar o offset
 169:uc_libc_dev/sensor/hx711.c **** // Retorna:	pdPASS se a configuração foi feita com sucesso com o valor da média em hx711.data
 170:uc_libc_dev/sensor/hx711.c **** //			pdFAIL se não foi possivel configurar o hx711
 171:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 172:uc_libc_dev/sensor/hx711.c **** static int hx711_Average(int calib) {
 173:uc_libc_dev/sensor/hx711.c **** 	int x; for(x=0; x<HX711_nSAMPLY; x++) {
 174:uc_libc_dev/sensor/hx711.c **** 		timeout = timeoutLoad;
 175:uc_libc_dev/sensor/hx711.c **** 		while (!hx711_ReadData(calib)) {
 176:uc_libc_dev/sensor/hx711.c **** 			if (timeout == 0) return pdFAIL;
 177:uc_libc_dev/sensor/hx711.c **** 		}
 178:uc_libc_dev/sensor/hx711.c **** 	}
 179:uc_libc_dev/sensor/hx711.c **** 
 180:uc_libc_dev/sensor/hx711.c **** 	return pdPASS;
 181:uc_libc_dev/sensor/hx711.c **** }
 182:uc_libc_dev/sensor/hx711.c **** 
 183:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 184:uc_libc_dev/sensor/hx711.c **** // Ajusta o offset de forma automática
 185:uc_libc_dev/sensor/hx711.c **** // 	Sempre que a balança estiver sem objeto a medir é o valor do peso for diferente de 0 é preciso 
 186:uc_libc_dev/sensor/hx711.c **** // Retorna:	pdPASS se a configuração foi feita com sucesso
 187:uc_libc_dev/sensor/hx711.c **** //			pdFAIL se não foi possivel configurar o hx711
 188:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 189:uc_libc_dev/sensor/hx711.c **** int hx711_ZeroAdjustment(void) {
 487              		.loc 1 189 0
 488              		.cfi_startproc
 489              		@ args = 0, pretend = 0, frame = 0
 490              		@ frame_needed = 0, uses_anonymous_args = 0
 491              	.LVL44:
 492 0000 F8B5     		push	{r3, r4, r5, r6, r7, lr}
 493              	.LCFI4:
 494              		.cfi_def_cfa_offset 24
 495              		.cfi_offset 3, -24
 496              		.cfi_offset 4, -20
 497              		.cfi_offset 5, -16
 498              		.cfi_offset 6, -12
 499              		.cfi_offset 7, -8
 500              		.cfi_offset 14, -4
 501              	.LBB8:
 502              	.LBB9:
 174:uc_libc_dev/sensor/hx711.c **** 		while (!hx711_ReadData(calib)) {
 503              		.loc 1 174 0
 504 0002 0D4E     		ldr	r6, .L64
 505              	.LBB10:
 506              	.LBB11:
 102:uc_libc_dev/sensor/hx711.c **** 
 507              		.loc 1 102 0
 508 0004 0D4F     		ldr	r7, .L64+4
 509              	.LBE11:
 510              	.LBE10:
 511              	.LBE9:
 512              	.LBE8:
 513              		.loc 1 189 0
 514 0006 1425     		movs	r5, #20
 515              	.LVL45:
 516              	.L57:
 517              	.LBB17:
 518              	.LBB16:
 174:uc_libc_dev/sensor/hx711.c **** 		while (!hx711_ReadData(calib)) {
 519              		.loc 1 174 0
 520 0008 0D4B     		ldr	r3, .L64+8
 521 000a 3268     		ldr	r2, [r6]
 522 000c 1C46     		mov	r4, r3
 523 000e 1A60     		str	r2, [r3]
 524              	.L54:
 525              	.LVL46:
 526              	.LBB14:
 527              	.LBB12:
 102:uc_libc_dev/sensor/hx711.c **** 
 528              		.loc 1 102 0
 529 0010 3B68     		ldr	r3, [r7]
 530 0012 5B05     		lsls	r3, r3, #21
 531 0014 03D5     		bpl	.L63
 532              	.LVL47:
 533              	.L56:
 534              	.LBE12:
 535              	.LBE14:
 176:uc_libc_dev/sensor/hx711.c **** 		}
 536              		.loc 1 176 0
 537 0016 2068     		ldr	r0, [r4]
 538 0018 0028     		cmp	r0, #0
 539 001a F9D1     		bne	.L54
 540 001c 07E0     		b	.L55
 541              	.LVL48:
 542              	.L63:
 543              	.LBB15:
 544              	.LBB13:
 545 001e 0120     		movs	r0, #1
 546 0020 FFF7FEFF 		bl	hx711_ReadData.part.0
 547              	.LVL49:
 548              	.LBE13:
 549              	.LBE15:
 175:uc_libc_dev/sensor/hx711.c **** 			if (timeout == 0) return pdFAIL;
 550              		.loc 1 175 0
 551 0024 0028     		cmp	r0, #0
 552 0026 F6D0     		beq	.L56
 553              	.LVL50:
 173:uc_libc_dev/sensor/hx711.c **** 		timeout = timeoutLoad;
 554              		.loc 1 173 0
 555 0028 013D     		subs	r5, r5, #1
 556              	.LVL51:
 557 002a EDD1     		bne	.L57
 180:uc_libc_dev/sensor/hx711.c **** }
 558              		.loc 1 180 0
 559 002c 0120     		movs	r0, #1
 560              	.LVL52:
 561              	.L55:
 562              	.LBE16:
 563              	.LBE17:
 190:uc_libc_dev/sensor/hx711.c **** 	int ret = hx711_Average(pdTRUE);
 191:uc_libc_dev/sensor/hx711.c **** 	hx711.offset = hx711.data;
 564              		.loc 1 191 0
 565 002e 054B     		ldr	r3, .L64+12
 566 0030 9A68     		ldr	r2, [r3, #8]
 567 0032 1A60     		str	r2, [r3]
 192:uc_libc_dev/sensor/hx711.c **** 	return ret;
 193:uc_libc_dev/sensor/hx711.c **** }
 568              		.loc 1 193 0
 569 0034 F8BD     		pop	{r3, r4, r5, r6, r7, pc}
 570              	.L65:
 571 0036 00BF     		.align	2
 572              	.L64:
 573 0038 00000000 		.word	.LANCHOR3
 574 003c 14C00920 		.word	537509908
 575 0040 00000000 		.word	.LANCHOR4
 576 0044 00000000 		.word	.LANCHOR0
 577              		.cfi_endproc
 578              	.LFE6:
 580              		.section	.text.hx711_GetValue,"ax",%progbits
 581              		.align	1
 582              		.global	hx711_GetValue
 583              		.thumb
 584              		.thumb_func
 586              	hx711_GetValue:
 587              	.LFB7:
 194:uc_libc_dev/sensor/hx711.c **** 
 195:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 196:uc_libc_dev/sensor/hx711.c **** // retorna o valor em gramas do peso lido do hx711
 197:uc_libc_dev/sensor/hx711.c **** // retorna pdPASS se a leitura foi feito com sucesso senão retorna pdFAIL
 198:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 199:uc_libc_dev/sensor/hx711.c **** int hx711_GetValue(s32 *data) {
 588              		.loc 1 199 0
 589              		.cfi_startproc
 590              		@ args = 0, pretend = 0, frame = 0
 591              		@ frame_needed = 0, uses_anonymous_args = 0
 592              		@ link register save eliminated.
 593              	.LVL53:
 200:uc_libc_dev/sensor/hx711.c **** 	#if (HX711_USE_PROCESS == pdOFF)
 201:uc_libc_dev/sensor/hx711.c **** 	hx711_ClearBuf();
 202:uc_libc_dev/sensor/hx711.c **** 	int ret = hx711_Average(pdFALSE);
 203:uc_libc_dev/sensor/hx711.c **** 	*data = hx711.data;
 204:uc_libc_dev/sensor/hx711.c **** 	return ret;
 205:uc_libc_dev/sensor/hx711.c **** 	#endif
 206:uc_libc_dev/sensor/hx711.c **** 	*data = hx711.data;
 594              		.loc 1 206 0
 595 0000 024B     		ldr	r3, .L67
 596 0002 9B68     		ldr	r3, [r3, #8]
 597 0004 0360     		str	r3, [r0]
 207:uc_libc_dev/sensor/hx711.c **** 	return pdPASS;
 208:uc_libc_dev/sensor/hx711.c **** }
 598              		.loc 1 208 0
 599 0006 0120     		movs	r0, #1
 600              	.LVL54:
 601 0008 7047     		bx	lr
 602              	.L68:
 603 000a 00BF     		.align	2
 604              	.L67:
 605 000c 00000000 		.word	.LANCHOR0
 606              		.cfi_endproc
 607              	.LFE7:
 609              		.section	.text.hx711_SetOffSet,"ax",%progbits
 610              		.align	1
 611              		.global	hx711_SetOffSet
 612              		.thumb
 613              		.thumb_func
 615              	hx711_SetOffSet:
 616              	.LFB8:
 209:uc_libc_dev/sensor/hx711.c **** 
 210:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 211:uc_libc_dev/sensor/hx711.c **** // OffSet é o valor a desconsiderar qualquer objeto que fica sobre o sensor para dar apoio ao objet
 212:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 213:uc_libc_dev/sensor/hx711.c **** void hx711_SetOffSet(s32 ofs) { hx711.offset = ofs; }
 617              		.loc 1 213 0
 618              		.cfi_startproc
 619              		@ args = 0, pretend = 0, frame = 0
 620              		@ frame_needed = 0, uses_anonymous_args = 0
 621              		@ link register save eliminated.
 622              	.LVL55:
 623              		.loc 1 213 0
 624 0000 014B     		ldr	r3, .L70
 625 0002 1860     		str	r0, [r3]
 626 0004 7047     		bx	lr
 627              	.L71:
 628 0006 00BF     		.align	2
 629              	.L70:
 630 0008 00000000 		.word	.LANCHOR0
 631              		.cfi_endproc
 632              	.LFE8:
 634              		.section	.text.hx711_GetOffSet,"ax",%progbits
 635              		.align	1
 636              		.global	hx711_GetOffSet
 637              		.thumb
 638              		.thumb_func
 640              	hx711_GetOffSet:
 641              	.LFB9:
 214:uc_libc_dev/sensor/hx711.c **** s32 hx711_GetOffSet(void) { return hx711.offset; }
 642              		.loc 1 214 0
 643              		.cfi_startproc
 644              		@ args = 0, pretend = 0, frame = 0
 645              		@ frame_needed = 0, uses_anonymous_args = 0
 646              		@ link register save eliminated.
 647              		.loc 1 214 0
 648 0000 014B     		ldr	r3, .L73
 649 0002 1868     		ldr	r0, [r3]
 650 0004 7047     		bx	lr
 651              	.L74:
 652 0006 00BF     		.align	2
 653              	.L73:
 654 0008 00000000 		.word	.LANCHOR0
 655              		.cfi_endproc
 656              	.LFE9:
 658              		.section	.text.hx711_SetScale,"ax",%progbits
 659              		.align	1
 660              		.global	hx711_SetScale
 661              		.thumb
 662              		.thumb_func
 664              	hx711_SetScale:
 665              	.LFB10:
 215:uc_libc_dev/sensor/hx711.c **** 
 216:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 217:uc_libc_dev/sensor/hx711.c **** // Escala ajusta a escala de medida de acordo com o tipo de sensor. Valor 1999.0 usado para sensor 
 218:uc_libc_dev/sensor/hx711.c **** // A escala não pode ser 0
 219:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 220:uc_libc_dev/sensor/hx711.c **** void hx711_SetScale(float scl) { hx711.scale = scl; }
 666              		.loc 1 220 0
 667              		.cfi_startproc
 668              		@ args = 0, pretend = 0, frame = 0
 669              		@ frame_needed = 0, uses_anonymous_args = 0
 670              		@ link register save eliminated.
 671              	.LVL56:
 672              		.loc 1 220 0
 673 0000 014B     		ldr	r3, .L76
 674 0002 5860     		str	r0, [r3, #4]	@ float
 675 0004 7047     		bx	lr
 676              	.L77:
 677 0006 00BF     		.align	2
 678              	.L76:
 679 0008 00000000 		.word	.LANCHOR0
 680              		.cfi_endproc
 681              	.LFE10:
 683              		.section	.text.hx711_GetScale,"ax",%progbits
 684              		.align	1
 685              		.global	hx711_GetScale
 686              		.thumb
 687              		.thumb_func
 689              	hx711_GetScale:
 690              	.LFB11:
 221:uc_libc_dev/sensor/hx711.c **** float hx711_GetScale(void) { return hx711.scale; }
 691              		.loc 1 221 0
 692              		.cfi_startproc
 693              		@ args = 0, pretend = 0, frame = 0
 694              		@ frame_needed = 0, uses_anonymous_args = 0
 695              		@ link register save eliminated.
 696              		.loc 1 221 0
 697 0000 014B     		ldr	r3, .L79
 698 0002 5868     		ldr	r0, [r3, #4]	@ float
 699 0004 7047     		bx	lr
 700              	.L80:
 701 0006 00BF     		.align	2
 702              	.L79:
 703 0008 00000000 		.word	.LANCHOR0
 704              		.cfi_endproc
 705              	.LFE11:
 707              		.section	.text.hx711_Tick,"ax",%progbits
 708              		.align	1
 709              		.global	hx711_Tick
 710              		.thumb
 711              		.thumb_func
 713              	hx711_Tick:
 714              	.LFB12:
 222:uc_libc_dev/sensor/hx711.c **** 
 223:uc_libc_dev/sensor/hx711.c **** static volatile uint timeRead = 0;
 224:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 225:uc_libc_dev/sensor/hx711.c **** // Esta função deve ser chamada a cada 1ms
 226:uc_libc_dev/sensor/hx711.c **** //-------------------------------------------------------------------------------------------------
 227:uc_libc_dev/sensor/hx711.c **** void hx711_Tick(void) {
 715              		.loc 1 227 0
 716              		.cfi_startproc
 717              		@ args = 0, pretend = 0, frame = 0
 718              		@ frame_needed = 0, uses_anonymous_args = 0
 719              		@ link register save eliminated.
 228:uc_libc_dev/sensor/hx711.c **** 	if (timeRead) timeRead--;
 720              		.loc 1 228 0
 721 0000 064B     		ldr	r3, .L90
 722 0002 1A68     		ldr	r2, [r3]
 723 0004 12B1     		cbz	r2, .L82
 724              		.loc 1 228 0 is_stmt 0 discriminator 1
 725 0006 1A68     		ldr	r2, [r3]
 726 0008 013A     		subs	r2, r2, #1
 727 000a 1A60     		str	r2, [r3]
 728              	.L82:
 229:uc_libc_dev/sensor/hx711.c **** 	if (timeout) timeout--;
 729              		.loc 1 229 0 is_stmt 1
 730 000c 044B     		ldr	r3, .L90+4
 731 000e 1A68     		ldr	r2, [r3]
 732 0010 12B1     		cbz	r2, .L81
 733              		.loc 1 229 0 is_stmt 0 discriminator 1
 734 0012 1A68     		ldr	r2, [r3]
 735 0014 013A     		subs	r2, r2, #1
 736 0016 1A60     		str	r2, [r3]
 737              	.L81:
 738 0018 7047     		bx	lr
 739              	.L91:
 740 001a 00BF     		.align	2
 741              	.L90:
 742 001c 00000000 		.word	.LANCHOR5
 743 0020 00000000 		.word	.LANCHOR4
 744              		.cfi_endproc
 745              	.LFE12:
 747              		.section	.text.hx711_Process,"ax",%progbits
 748              		.align	1
 749              		.global	hx711_Process
 750              		.thumb
 751              		.thumb_func
 753              	hx711_Process:
 754              	.LFB13:
 230:uc_libc_dev/sensor/hx711.c **** }
 231:uc_libc_dev/sensor/hx711.c **** 
 232:uc_libc_dev/sensor/hx711.c **** #if (HX711_USE_PROCESS == pdON)
 233:uc_libc_dev/sensor/hx711.c **** // Coleta dados do hx711 a cada X ms
 234:uc_libc_dev/sensor/hx711.c **** // Usando o processo têm a vantagem de não ficar muito tempo em um loop lendo todas as amostras.
 235:uc_libc_dev/sensor/hx711.c **** // Porém, a desvantagem é que os valores demoram para estabilizar quando a há mudanças brusca de pe
 236:uc_libc_dev/sensor/hx711.c **** // 	Ex: Se colocar um peso na balança, para 20 amostras a 10ms de tempo de processo, a balança vai 
 237:uc_libc_dev/sensor/hx711.c **** //		estabilizar depois de 200ms, e durante este período vamos receber os valores crescendo
 238:uc_libc_dev/sensor/hx711.c **** // Não usando processo, quando mandamos ler o valor da balança a função vai trazer o valor já estab
 239:uc_libc_dev/sensor/hx711.c **** //	A desvantagem é que ficamos muito tempo parado em um loop para leitura dos valores, o tempo é re
 240:uc_libc_dev/sensor/hx711.c **** //		a taxa de amostragem do hx711 e tempo de comunicação
 241:uc_libc_dev/sensor/hx711.c **** void hx711_Process(void) {
 755              		.loc 1 241 0 is_stmt 1
 756              		.cfi_startproc
 757              		@ args = 0, pretend = 0, frame = 0
 758              		@ frame_needed = 0, uses_anonymous_args = 0
 759              		@ link register save eliminated.
 242:uc_libc_dev/sensor/hx711.c **** 	if (timeRead) return;
 760              		.loc 1 242 0
 761 0000 064B     		ldr	r3, .L96
 762 0002 1A68     		ldr	r2, [r3]
 763 0004 42B9     		cbnz	r2, .L92
 243:uc_libc_dev/sensor/hx711.c **** 	timeRead = HX711_READING_TIME;
 764              		.loc 1 243 0
 765 0006 0A22     		movs	r2, #10
 766 0008 1A60     		str	r2, [r3]
 767              	.LVL57:
 768              	.LBB20:
 769              	.LBB21:
 102:uc_libc_dev/sensor/hx711.c **** 
 770              		.loc 1 102 0
 771 000a 054B     		ldr	r3, .L96+4
 772 000c 1868     		ldr	r0, [r3]
 773 000e 10F48060 		ands	r0, r0, #1024
 774 0012 01D1     		bne	.L92
 775 0014 FFF7FEBF 		b	hx711_ReadData.part.0
 776              	.LVL58:
 777              	.L92:
 778 0018 7047     		bx	lr
 779              	.L97:
 780 001a 00BF     		.align	2
 781              	.L96:
 782 001c 00000000 		.word	.LANCHOR5
 783 0020 14C00920 		.word	537509908
 784              	.LBE21:
 785              	.LBE20:
 786              		.cfi_endproc
 787              	.LFE13:
 789              		.section	.bss.timeoutLoad,"aw",%nobits
 790              		.align	2
 791              		.set	.LANCHOR3,. + 0
 794              	timeoutLoad:
 795 0000 00000000 		.space	4
 796              		.section	.bss.hx711,"aw",%nobits
 797              		.align	2
 798              		.set	.LANCHOR0,. + 0
 801              	hx711:
 802 0000 00000000 		.space	12
 802      00000000 
 802      00000000 
 803              		.section	.bss.timeRead,"aw",%nobits
 804              		.align	2
 805              		.set	.LANCHOR5,. + 0
 808              	timeRead:
 809 0000 00000000 		.space	4
 810              		.section	.bss.idxBuf,"aw",%nobits
 811              		.align	2
 812              		.set	.LANCHOR1,. + 0
 815              	idxBuf:
 816 0000 00000000 		.space	4
 817              		.section	.bss.timeout,"aw",%nobits
 818              		.align	2
 819              		.set	.LANCHOR4,. + 0
 822              	timeout:
 823 0000 00000000 		.space	4
 824              		.section	.bss.buf,"aw",%nobits
 825              		.align	2
 826              		.set	.LANCHOR2,. + 0
 829              	buf:
 830 0000 00000000 		.space	80
 830      00000000 
 830      00000000 
 830      00000000 
 830      00000000 
 831              		.text
 832              	.Letext0:
 833              		.file 2 "uc_libc_dev/_libdef/uc_libdefs.h"
 834              		.file 3 "uc_libc_dev/_arch/arm_lpc/timer/delay.h"
DEFINED SYMBOLS
                            *ABS*:00000000 hx711.c
D:\_temp\_windows\ccmDvJCc.s:23     .text.hx711_ReadData.part.0:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:27     .text.hx711_ReadData.part.0:00000000 hx711_ReadData.part.0
D:\_temp\_windows\ccmDvJCc.s:239    .text.hx711_ReadData.part.0:0000011c $d
D:\_temp\_windows\ccmDvJCc.s:249    .text.hx711_Config:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:254    .text.hx711_Config:00000000 hx711_Config
D:\_temp\_windows\ccmDvJCc.s:329    .text.hx711_Config:0000004c $d
D:\_temp\_windows\ccmDvJCc.s:338    .text.hx711_ClearBuf:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:343    .text.hx711_ClearBuf:00000000 hx711_ClearBuf
D:\_temp\_windows\ccmDvJCc.s:372    .text.hx711_ClearBuf:00000018 $d
D:\_temp\_windows\ccmDvJCc.s:378    .text.hx711_Reset:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:383    .text.hx711_Reset:00000000 hx711_Reset
D:\_temp\_windows\ccmDvJCc.s:426    .text.hx711_Reset:00000024 $d
D:\_temp\_windows\ccmDvJCc.s:433    .text.hx711_Init:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:438    .text.hx711_Init:00000000 hx711_Init
D:\_temp\_windows\ccmDvJCc.s:472    .text.hx711_Init:00000028 $d
D:\_temp\_windows\ccmDvJCc.s:480    .text.hx711_ZeroAdjustment:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:485    .text.hx711_ZeroAdjustment:00000000 hx711_ZeroAdjustment
D:\_temp\_windows\ccmDvJCc.s:573    .text.hx711_ZeroAdjustment:00000038 $d
D:\_temp\_windows\ccmDvJCc.s:581    .text.hx711_GetValue:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:586    .text.hx711_GetValue:00000000 hx711_GetValue
D:\_temp\_windows\ccmDvJCc.s:605    .text.hx711_GetValue:0000000c $d
D:\_temp\_windows\ccmDvJCc.s:610    .text.hx711_SetOffSet:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:615    .text.hx711_SetOffSet:00000000 hx711_SetOffSet
D:\_temp\_windows\ccmDvJCc.s:630    .text.hx711_SetOffSet:00000008 $d
D:\_temp\_windows\ccmDvJCc.s:635    .text.hx711_GetOffSet:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:640    .text.hx711_GetOffSet:00000000 hx711_GetOffSet
D:\_temp\_windows\ccmDvJCc.s:654    .text.hx711_GetOffSet:00000008 $d
D:\_temp\_windows\ccmDvJCc.s:659    .text.hx711_SetScale:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:664    .text.hx711_SetScale:00000000 hx711_SetScale
D:\_temp\_windows\ccmDvJCc.s:679    .text.hx711_SetScale:00000008 $d
D:\_temp\_windows\ccmDvJCc.s:684    .text.hx711_GetScale:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:689    .text.hx711_GetScale:00000000 hx711_GetScale
D:\_temp\_windows\ccmDvJCc.s:703    .text.hx711_GetScale:00000008 $d
D:\_temp\_windows\ccmDvJCc.s:708    .text.hx711_Tick:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:713    .text.hx711_Tick:00000000 hx711_Tick
D:\_temp\_windows\ccmDvJCc.s:742    .text.hx711_Tick:0000001c $d
D:\_temp\_windows\ccmDvJCc.s:748    .text.hx711_Process:00000000 $t
D:\_temp\_windows\ccmDvJCc.s:753    .text.hx711_Process:00000000 hx711_Process
D:\_temp\_windows\ccmDvJCc.s:782    .text.hx711_Process:0000001c $d
D:\_temp\_windows\ccmDvJCc.s:790    .bss.timeoutLoad:00000000 $d
D:\_temp\_windows\ccmDvJCc.s:794    .bss.timeoutLoad:00000000 timeoutLoad
D:\_temp\_windows\ccmDvJCc.s:797    .bss.hx711:00000000 $d
D:\_temp\_windows\ccmDvJCc.s:801    .bss.hx711:00000000 hx711
D:\_temp\_windows\ccmDvJCc.s:804    .bss.timeRead:00000000 $d
D:\_temp\_windows\ccmDvJCc.s:808    .bss.timeRead:00000000 timeRead
D:\_temp\_windows\ccmDvJCc.s:811    .bss.idxBuf:00000000 $d
D:\_temp\_windows\ccmDvJCc.s:815    .bss.idxBuf:00000000 idxBuf
D:\_temp\_windows\ccmDvJCc.s:818    .bss.timeout:00000000 $d
D:\_temp\_windows\ccmDvJCc.s:822    .bss.timeout:00000000 timeout
D:\_temp\_windows\ccmDvJCc.s:825    .bss.buf:00000000 $d
D:\_temp\_windows\ccmDvJCc.s:829    .bss.buf:00000000 buf
                     .debug_frame:00000010 $d

UNDEFINED SYMBOLS
__aeabi_i2f
__aeabi_fdiv
__aeabi_f2iz
delay
